import { request } from "../utils/request";

//微信登录
export const wxLogin = (data) => {
  return request({
    url: "/app-api/member/auth/weixin-mini-app-login",
    method: "POST",
    data,
  });
};

//退出登录
export const authLogout = () => {
  return request({
    url: "/app-api/member/auth/logout",
    method: "POST",
  });
};

//获取用户信息
export const getUserInfo = () => {
  return request({
    url: "/app-api/llm/mini/app/user/get",
    method: "GET",
  });
};
//修改用户信息
//修改基本信息
export const userUpdate = (data) => {
  return request({
    url: "/app-api/member/user/update",
    method: "PUT",
    data,
  });
};

//刷新令牌
export const refreshToken = (refreshToken) => {
  return request({
    url: "/app-api/member/auth/refresh-token?refreshToken=" + refreshToken,
    method: "POST",
  });
};
